<template>
  <div style="padding: 100px">
    1 / {{state}}
    <br />
    <el-button @click="test">test</el-button>
    <br />
    <DateFormat :value="state.now" :format="'YYYY-MM-DD'"></DateFormat>

    <hr />
    <MyFileUpload :entityId="1" :entityTypeId="1"  :key="'FileUpload1'"></MyFileUpload>
    <hr />
    <MyImageUpload :entityId="10" :entityTypeId="10"  :key="'MyImageUpload10'"></MyImageUpload>
    <hr />
    {{state.fid}}
    <MyImageUploadOne v-model="state.fid"  :key="'MyImageUploadOne100'" @uploaddone="imageUploadDone"></MyImageUploadOne>
  </div>
</template>

<script setup>
import {reactive, ref, onMounted, onUnmounted, defineAsyncComponent} from "vue";
import { useRouter } from "vue-router";
import dayjs from "dayjs";
const router = useRouter();
import PermissionType from "@/utils/PermissionType";

defineOptions({
  name: "Test1",
});
const test = () => {
  router.push("/test/test3?stuid=" + 1)
}
const state = reactive({
  now : dayjs(),
  fid:0,
  pid : PermissionType.sysAdmin
})
const imageUploadDone= (fId) => {
  console.log(fId)
}
onMounted(() => {
  const perms = ["1", "2"];
  const permission = ["2"]
  const a = !perms.includes("2")
  console.log(a)
});
</script>

<style lang="scss" scoped>

</style>
